package com.example.pojo.entity;

import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;


@Data

public class User {

    private String userName;
    private String password;
    private String petName;
    private Integer gender;
    //    private Integer age;

    private String email;

    private LocalDate birthday;
    private Integer isDel;
    private Integer isBlack;

    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private String head;
    private Integer isVip;
    private String blackContent;
    private Integer isLogin;

    public void insert() {
        createTime = LocalDateTime.now();
        updateTime = LocalDateTime.now();
        isDel = 0;
        isBlack = 0;
        isVip = 0;
        isLogin = 0;
        if (gender == null) {
            gender = 0;
        }
    }

    public void update() {
        updateTime = LocalDateTime.now();
    }
}
